<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>返回时区名称</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="datetimezone.getlocation.html">« DateTimeZone::getLocation</a></li>
      <li style="float: right;"><a href="datetimezone.getoffset.html">DateTimeZone::getOffset »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.datetimezone.html">DateTimeZone</a></li>
    <li>返回时区名称</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="datetimezone.getname" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">DateTimeZone::getName</h1>
  <h1 class="refname">timezone_name_get</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">DateTimeZone::getName</span> -- <span class="refname">timezone_name_get</span> &mdash; <span class="dc-title">返回时区名称</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-datetimezone.getname-description">
  <h3 class="title">说明</h3>
  <p class="para">面向对象风格</p>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>DateTimeZone::getName</strong></span>(): <span class="type">string</span></div>

  <p class="para rdfs-comment">过程化风格</p>
  <div class="methodsynopsis dc-description"><span class="methodname"><a href="function.timezone-name-get.html" class="methodname">timezone_name_get</a></span>(<span class="methodparam"><span class="type"><a href="class.datetimezone.html" class="type DateTimeZone">DateTimeZone</a></span> <code class="parameter">$object</code></span>): <span class="type">string</span></div>

  <p class="para rdfs-comment">
   返回时区名称。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-datetimezone.getname-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>
<code class="parameter">object</code></dt>

    <dd>

     <p class="para">
      要获得名称的 <span class="classname"><a href="class.datetimezone.html" class="classname">DateTimeZone</a></span>。
     </p>
    </dd>

   
  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-datetimezone.getname-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   根据区域类型、UTC 时差（类型 1）、时区缩写（类型 2）和 IANA 时区数据库发布的时区标识符（类型
   3），描述符字符串使用相同时差和/或规则创建新的
   <span class="classname"><a href="class.datetimezone.html" class="classname">DateTimeZone</a></span>。例如：<code class="literal">02:00</code>、<code class="literal">CEST</code>
   或者 <a href="timezones.html" class="link">时区列表</a>中的其中一个时区名称。
  </p>
 </div>


</div></div></div></body></html>